package com.ruoyi.eam.service.impl;

import com.ruoyi.eam.doman.AssetImages;
import com.ruoyi.eam.mapper.AssetImagesMapper;
import com.ruoyi.eam.service.IAssetImagesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 资产图片Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-19
 */
@Service
public class AssetImagesServiceImpl implements IAssetImagesService
{
    @Autowired
    private AssetImagesMapper assetImagesMapper;

    /**
     * 查询资产图片
     *
     * @param attachId 资产图片主键
     * @return 资产图片
     */
    @Override
    public AssetImages selectAssetImagesByAttachId(Long attachId)
    {
        return assetImagesMapper.selectAssetImagesByAttachId(attachId);
    }

    /**
     * 查询资产图片列表
     *
     * @param assetImages 资产图片
     * @return 资产图片
     */
    @Override
    public List<AssetImages> selectAssetImagesList(AssetImages assetImages)
    {
        return assetImagesMapper.selectAssetImagesList(assetImages);
    }

    /**
     * 新增资产图片
     *
     * @param assetImages 资产图片
     * @return 结果
     */
    @Override
    public int insertAssetImages(AssetImages assetImages)
    {
        return assetImagesMapper.insertAssetImages(assetImages);
    }

    /**
     * 修改资产图片
     *
     * @param assetImages 资产图片
     * @return 结果
     */
    @Override
    public int updateAssetImages(AssetImages assetImages)
    {
        return assetImagesMapper.updateAssetImages(assetImages);
    }

    /**
     * 批量删除资产图片
     *
     * @param attachIds 需要删除的资产图片主键
     * @return 结果
     */
    @Override
    public int deleteAssetImagesByAttachIds(Long[] attachIds)
    {
        return assetImagesMapper.deleteAssetImagesByAttachIds(attachIds);
    }

    /**
     * 删除资产图片信息
     *
     * @param attachId 资产图片主键
     * @return 结果
     */
    @Override
    public int deleteAssetImagesByAttachId(Long attachId)
    {
        return assetImagesMapper.deleteAssetImagesByAttachId(attachId);
    }
}
